package com.hyq.learn.api;

import com.hyq.learn.api.config.ApplicationProperties;
import com.hyq.learn.api.config.datasource.DbProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author : heyuqin
 * @since : 2024/03/06 16:52
 */
@SpringBootApplication(scanBasePackages = {"com.hyq.learn"})
@MapperScan(basePackages = {"com.hyq.learn.api.mapper"})
@EnableConfigurationProperties({ApplicationProperties.class, DbProperties.class})
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableAsync
@EnableRetry
public class ApiApplication {
    public static void main(String[] args) {
        new SpringApplicationBuilder()
                .bannerMode(Banner.Mode.OFF)
                .sources(ApiApplication.class)
                .run(args);
    }
}
